package com.mhkj.base.fruitType.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.mhkj.base.busiType.entity.BusinessType;
import com.mhkj.base.templete.entity.PlanTemplete;
import com.mhkj.base.templete.entity.PlanTempleteData;
import com.mics.core.common.validate.annotation.NotNull;
import com.mics.core.common.validate.annotation.Validate;
import com.mics.core.system.base.entity.BaseDomain;

/**
 * 成果类别
 * @author mics
 * @date 2018年8月9日
 * @version 1.0
 */
@Entity
@Table(name="t_fruit_type")
@Validate
public class FruitType extends BaseDomain {

	/**
	 * 序列号
	 */
	private static final long serialVersionUID = -4938648446167835286L;
	
	
	/**
	 * 模板
	 */
	@JoinColumn(name="plan_templete_id")
	@ManyToOne(fetch=FetchType.LAZY)
	private PlanTemplete planTemplete;
	
	/**
	 * 成果名称
	 */
	@NotNull(message="成果名称不能为空")
	@Column(name="name",length=128,nullable=false)
	private String name;
	
	/**
	 * 业务模块
	 */
	@JoinColumn(name="busi_mode")
	@ManyToOne(fetch=FetchType.LAZY)
	private BusinessType businessType;
	
	/**
	 * 成果节点
	 */
	@NotNull(message="成果节点不能为空")
	@JoinColumn(name="no_result")
	@ManyToOne(fetch=FetchType.LAZY)
	private PlanTempleteData nodeResult;
	
	/**
	 * 成果类别
	 */
	@JoinColumn(name="node_prepare")
	@ManyToOne(fetch=FetchType.LAZY)
	private PlanTempleteData nodePrepare;
	
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public PlanTempleteData getNodeResult() {
		return nodeResult;
	}

	public void setNodeResult(PlanTempleteData nodeResult) {
		this.nodeResult = nodeResult;
	}

	public PlanTempleteData getNodePrepare() {
		return nodePrepare;
	}

	public void setNodePrepare(PlanTempleteData nodePrepare) {
		this.nodePrepare = nodePrepare;
	}

	public BusinessType getBusinessType() {
		return businessType;
	}

	public void setBusinessType(BusinessType businessType) {
		this.businessType = businessType;
	}

	public PlanTemplete getPlanTemplete() {
		return planTemplete;
	}

	public void setPlanTemplete(PlanTemplete planTemplete) {
		this.planTemplete = planTemplete;
	}
	
	
}
